

<?PHP
	include 'admin/m/buy/o_transaction.php';
begin_form('',$id,$next_page,TRUE);

if($buy=='new')
{
	
	global $conf;
	//prepopulate
//	$e['user_email']='paul_1287652376_per@stratuscast.com';
//	echo $conf->a['purchase-sandbox'];
	if($conf->a['purchase-sandbox'] == 'true')
	{
			$e['user_password']='panget';
			$e['confirm_password']='panget';
			$e['serial_first_name']='Juan';
			$e['serial_last_name']='Dela Cruz';
			$e['serial_user_address']='12 Escriva Drive';
			$e['serial_user_address_1']='San Miguel Village';
			$e['serial_user_city']='Pasig';
			$e['serial_user_state']='Metro Manila';
			$e['serial_user_zip']='1023';

			$e['user_secret']='Your First Car';
			$e['user_answer']='COROLLA';
		//	$e['serial_country']='PH';
			$e['serial_user_mobile']='+643333333';
	}



	?>

	<h2>Your Information</h2>
	<?PHP
//	 begin_form($cmd,$id,$q,$cleanurl)
	$o['label']='Email';
	p_input('user_email',$o,$e);

?>
	<hr />
<?PHP
	$o['label']='First Name';
	p_input('serial_first_name',$o,$e);

	$o['label']='Last Name';
	p_input('serial_last_name',$o,$e);
	
		$o['label']='Password';
		$o['password']=TRUE;
		p_input('user_password',$o,$e);

		$o['label']='Confirm';
		p_input('confirm_password',$o,$e);
		$o['password']=FALSE;?>
		
	

		<?PHP
		
		
		$o['label']='Security Question';
		p_input('user_secret',$o,$e);
		$o['label']='Security Answer';
		p_input('user_answer',$o,$e);?>

		<?PHP

?>

<hr />
<?PHP


	


	$o['label']='Address';
	p_input('serial_user_address',$o,$e);

//	$o['label']='Address Line 2';
//  p_input('serial_user_address_1',$o,$e);

	$o['label']='City ';
	p_input('serial_user_city',$o,$e);
	$o['label']='Postcode';
	p_input('serial_user_zip',$o,$e);

		$country_list=get_countries();
		$o['label']='Country';
		$o['none']=TRUE;

		p_select('serial_country',$country_list,$e,'0','1',$o);
?>
	<div id='stateholder'>
	
		
			<?PHP
			$o['label']='State';
			p_input('serial_user_state',$o,$e);
			?>
	</div>
	
	<div id='regionholder' style='display:none;'>
			<?PHP
				$ph_list=get_ph_regions();
				$o['label']='Region';
				$o['none']=TRUE;
		
				p_select('serial_user_region',$ph_list,$e,'0','1',$o);

			?>
	</div>
<?PHP



	$o['label']='Telephone';
	p_input('serial_user_mobile',$o,$e);


	include 'admin/b/autofilluser.php';


	$o['label']='user_name';
	p_hidden('user_name',$o,$e);
	$e['new_user']=randomchar();
	p_hidden('new_user',$o,$e);
	?>

	<hr />
	
	<?PHP

}
//

?>


<fieldset id='payment_method'> 
		<h2>Payment Method</h2>
		
		<input type="radio"  value='PayPal' name='payment_method' id="payment_paypal" /> Paypal
		<input type="radio"  value='CC' name='payment_method' id="payment_CC"/> Credit Card
		<label for='payment_method'></label>
</fieldset>

<hr />


<style type="text/css" media="screen">
	#data_form
	{
		display:none;
	}
</style>

<?PHP

p_submit("Next","buy_submit");
end_form($_GET['cmd']);

?>
<script src="assets/js/o_buy.js" type="text/javascript" charset="utf-8"></script>

